{extend name="base/main" /}
{block name="body"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>菜单管理 / 添加菜单</h5>
            </div>
            <div class="ibox-content">
                <form id="f" action="{:url('menu/add')}" class="form-horizontal m-t">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">菜单名称：</label>
                        <div class="col-sm-4">
                            <input name="title" class="form-control" type="text" datatype="*2-30" errormsg="菜单名称范围在2~30位之间！">
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 显示的菜单或是展示的功能名称</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">分组名称：</label>
                        <div class="col-sm-4">
                            <input name="group" class="form-control" type="text" datatype="*2-16" errormsg="分组名称范围在2~16位之间！">
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 将菜单进行分组，显示在左侧导航栏中</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">选择上级菜单：</label>
                        <div class="col-sm-4">
                            <select name="pid" class="form-control">
                                {volist name="Menus" id="menu"}
                                    <option value="{$menu.id}" <?php if($menu['id'] == $pid){echo "selected";}?>>{$menu.title_show}</option>
                                {/volist}
                            </select>
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 选择当前菜单所属上级，不选默认为根菜单</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">url地址：</label>
                        <div class="col-sm-4">
                            <input name="url" class="form-control" type="text" datatype="*2-50" errormsg="地址范围在2~50位之间！">
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 将控制器和方法名填写例如:user/index</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">显示图标：</label>
                        <div class="col-sm-4">
                            <input name="icon" class="form-control" type="text" datatype="*|*0-0">
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 使用Font Awesome 4.4.0版本，去查看相对应的图标，例如：fa fa-television</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序：</label>
                        <div class="col-sm-4">
                            <input name="sort" class="form-control" type="text" value="0" datatype="n1-5" errormsg="只能输入0-99999的数字，长度不可以超过5位！">
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i>菜单排序，在左侧导航栏中只能菜单显示的顺序</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-3">
                            <input type="hidden" name="module" value="admin" />
                            <button class="btn btn-primary" type="submit">提交</button>
                            <button class="btn btn-default historygo" type="button">返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
{/block}